<%-- 
    Document   : index
    Created on : Sep 26, 2014, 12:09:33 AM
    Author     : Java
--%>
<%@page import="jamjun.infra.model.ActionType"%>
<%@page import="jsalon.resources.buttonEnum"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<jsp:useBean id="Model" class="jsalon.web.vm.CustomerVM"  scope="session"/> 

<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
<!DOCTYPE html>
<t:basic>
    <jsp:attribute name="header">
    </jsp:attribute>
    <jsp:attribute name="content">
        <div id="customer_top" style=" padding: 0px 0px 5px 0px">
            <jsp:include page="top.jsp"  />
        </div>
        <div id="customer_List"></div>
    </jsp:attribute>
        
</t:basic>

<script type="text/javascript">
    $(body).ready(function(){
        $("#customer_top").initialUI();
        customer_add();
        customer_List();
        
    });

    function customer_add(){
        $("#customer_btnAdd").click(function(){
             var dataSend = {"customerCode":"","actionType":"<%=ActionType.insert.toString()%>"};
            $.fn.openDlgFrame({
                dlg: "customerList_DetailDlg",dlgID:"",titleCaption: "<%=jsalon.resources.captionEnum.titleBar_customerInfo.getString() %>",
                width: 800,height: 550,
                url: "/jSalon/customer?[ac]=detail",sendData: dataSend,
                resizable: true,Modal: true,
                autoDIV: true,
                closeOther: true,
                closeCallback: "",
                openCallback: "",
                zIndex: 999,
                disableClose : false
            });
        });
    }

    function customer_List(pageNumber) {
        //var dataSend = $("form#AppRolesAccFunction_Filter").serializeObject();
        var dataSend = "";
        $("#customer_List").loadGrid({
            url: 'customer?[ac]=list',  //get data from controller
            data: dataSend,   // send data for search
            pageNo: pageNumber,
            callback: "",       
            makeHover: true, //Option for mouse over on rows display highlight  default = true;
            isBlockUI: true,
            isMakePaging:true, //Do make paging.
            height:500
        });
    }
</script>       